package com.coolingme.controller.test;

import com.coolingme.server.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * WebSocket
 *
 * @author wangyue
 * @date 2020/10/16 10:39
 */
@Controller
public class SocketController {

    @Autowired
    private WebSocketServer webSocketServer;

    @GetMapping("/websocket")
    public String websocket() {
        return "test/webSocket";
    }

    @GetMapping("/websocket_test")
    public String websocketTest() {
        return "test/webSocketTest";
    }

//    @GetMapping("/webSocket")
//    public ModelAndView socket() {
//        ModelAndView mav=new ModelAndView("/webSocket");
////        mav.addObject("userId", userId);
//        return mav;
//    }

}
